#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <iostream>

using namespace Eigen;
using namespace std;

int main()
{
    Eigen::Transform<float,3,Eigen::Affine> j;
    Translation<float,3> t;
    AngleAxisd aa=AngleAxisd(M_PI/6,Vector3d::UnitZ());

  cout<<aa.matrix()<<endl;
  MatrixXf m;
  m=t.translation().matrix();
  cout<<m<<endl;
  Vector3d v(1,2,3);  // a vector
  AngleAxisd rot(0.5*M_PI, Vector3d::UnitY()); // rotation of pi/2 radians
  cout << "Applying rotation yields:" << endl << rot * v << endl;
  Translation<double,3> tr(Vector3d::UnitZ()); // translation in z-direction
  cout << "Applying translation yields:" << endl << tr * v << endl;
  Affine3d f = rot * tr; // combine in one transformation
  cout << "Applying both yields:" << endl <<  f * v << endl;
}
